url='https://blog.csdn.net/Fahaxiki_lyt?type=blog'

import requests
r=requests.get(url,headers={"user-agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36"
                                      "(KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
                        }
)
if r.status_code!=200:
    raise Exception()

html_doc=r.text

from bs4 import BeautifulSoup
soup=BeautifulSoup(html_doc,'html.parser')


h2_nodes=soup.find_all('div', class_='blog-list-box-top')

for h2_node in h2_nodes:
    link=h2_node.find('h4')
    print(link.get_text())
    
    